package upc.edu.pe.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import upc.edu.pe.dominio.Condominio;
import upc.edu.pe.dominio.Cuotas;
import upc.edu.pe.dominio.Residente;
import upc.edu.pe.dominio.Vivienda;

@RequestMapping("/listadomorosos/**")
@Controller
public class ListadoMorososController {

	
    @RequestMapping
    public void get(ModelMap modelMap, HttpServletRequest request, HttpServletResponse response) {
    }

    
    @RequestMapping
    public String index() {
        return "listarcuotas/index";
    }

    @RequestMapping
    public String Morosos(org.springframework.ui.ModelMap modelMap) {
    	
    	List<Cuotas> morosos = Cuotas.buscaMorosos();
    	modelMap.put("cuotas",morosos);
    	return "listadomorosos/index";
    }	
		
    @RequestMapping(method = RequestMethod.POST, value = "{id}")
    public void post(@PathVariable Long id, ModelMap modelMap, HttpServletRequest request, HttpServletResponse response) {
    }
    
    @RequestMapping
    public String listado(org.springframework.ui.ModelMap modelMap) {
    	
    	List<Cuotas> cuotas = Cuotas.buscaMorosos();
    	modelMap.put("cuotas",cuotas);
        return "listadomorosos/index";
    }
    


}
